package yicr.untils.gis.mif.domain;

import java.util.ArrayList;
import java.util.List;

/**
 * <h3>Title:</h3>
 * <p>
 *
 * <h3>Description</h3>
 *  mif文件示例
 * Version 300
 * Charset "WindowsSimpChinese"
 * Delimiter ","
 * CoordSys Earth Projection 1, 104
 * Columns 5
 *   Name Char(60)
 *   DisPlay Smallint
 *   x Float
 *   y Float
 *   字段5 Smallint
 * Data
 *
 * Region  1
 *   4
 * 111.640812 32.628132
 * 111.643925 32.630836
 * 111.645122 32.638921
 * 111.640812 32.628132
 *     Pen (1,2,11579568)
 *     Brush (2,13689087,5291995)
 *     Center 111.987231 32.688509
 * Region  1
 *   4
 * 111.640812 32.628132
 * 111.643925 32.630836
 * 111.645122 32.638921
 * 111.640812 32.628132
 *     Pen (1,2,11579568)
 *     Brush (2,13689087,5291995)
 *     Center 111.987231 32.688509
 *
 * <p>
 *
 * <h3>Author</h3>
 * <p>
 * Lin Shao
 * <h3>Update Time</h3>
 * <p>2021-05-21 16:08
 *
 * @author Lin Shao
 * @version 1.0
 */
public class MifFileObject {
    private String fileAbsPath=null;


    /*
    mif文件前几行示例,注意colums后面,这里会有变动
    String title="Version   300\n" +
            "Charset \"WindowsSimpChinese\"\n" +
            "Delimiter \",\"\n" +
            "CoordSys Earth Projection 1, 104\n" +
            "Columns 1\n" +
            "  ID Integer\n" +
            "Data\n";
            */
    private String title=null;//文件开头的多行，截止到第一个空行
    private List<MifRegion> mifRegionList=new ArrayList<>();

    public MifFileObject(String fileAbsPath) {
        this.fileAbsPath = fileAbsPath;
    }

    public MifFileObject(){}

    public String getFileAbsPath() {
        return fileAbsPath;
    }

    public void setFileAbsPath(String fileAbsPath) {
        this.fileAbsPath = fileAbsPath;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public List<MifRegion> getMifRegionList() {
        return mifRegionList;
    }

    public void setMifRegionList(List<MifRegion> mifRegionList) {
        this.mifRegionList = mifRegionList;
    }

    @Override
    public String toString() {
        return "MifFileObject{" +
                "fileAbsPath='" + fileAbsPath + '\'' +
                ", title='" + title + '\'' +
                ", mifRegionList=" + mifRegionList +
                '}';
    }
}
